package com.xujianlun.cpms.mapper.shop;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xujianlun.cpms.entity.shop.Carts;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author xujianlun
 * @since 2022-12-14
 */
@Mapper
public interface CartsMapper extends BaseMapper<Carts> {

    Page<Carts> pageUserCart(Page<Object> objectPage,@Param("userId") Integer userId,@Param("role") String role, @Param("name") String name);

    @Update("update shop_carts set num =#{num} where id =#{id}")
    void updateNum(@Param("num") Integer num, @Param("id") Integer id);
}
